<template>
  <!-- 彩色进度条 -->
  <div class="processContainer">
    <div class="processNumber">{{ dx }}</div>
    <div class="warningBlue"/>
    <div class="triangleRight"/>
  </div>
</template>

<script>
  export default {
    name: 'ProcessGreen',
    props: {
      dx: {
        type: Number,
        default: 0
      },
    },
  }
</script>

<style scoped>
  .triangleRight {
    position: absolute;
    top: -6px;
    right: -8px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-left: 20px solid #0096c7;
    border-bottom: 10px solid transparent;
  }
.processNumber{
  position: absolute;
  left: 32%;
  top: -32px;
  font-size: 18px;
}
.processContainer {
  position: relative;
  text-align: center;
  width: 100%;
}
.processContainer .warningBlue {
  height: 6px;
}
.warningBlue {
  position: relative;
  background-color: #0096c7;
  border: 1px solid #0096c7;
  /*border-radius: 10px;*/
  /*box-shadow: 1vw 3vh 10vh rgba(109, 168, 7, 0.8);*/
  background-size: 3em 3em;
  background-image: linear-gradient(-45deg, transparent 0em, transparent 0.8em, #48cae4 0.9em, #48cae4 2.1em, transparent 2.1em, transparent 2.9em, #48cae4 3.1em);
  -webkit-animation: warning-animation 750ms infinite linear;
  -moz-animation: warning-animation 750ms infinite linear;
  animation: warning-animation 750ms infinite linear;
}
.warningBlue:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100%;
  border-radius: 10px;
  background-image: linear-gradient(to bottom, #0096c7, rgba(0, 180, 216, 0.6) 15%, transparent 60%, #0096c7);
}

@-webkit-keyframes warning-animation {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 3em 0;
  }
}
@-moz-keyframes warning-animation {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 3em 0;
  }
}
@keyframes warning-animation {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 3em 0;
  }
}
</style>
